package com.sfx.controller;

import com.sfx.model.CommonBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class ScopeController1 {
    @Autowired
    private CommonBean commonBean;

    public void doScopeController1() {
        //李四自己创建一个对象引用公共的Bean
        CommonBean commonBean1 = commonBean;
        System.out.println("李四修改前的数据" + commonBean);
        commonBean1.setName("C++");
        System.out.println("李四修改后的数据" + commonBean1);
    }
}